-
Notifications
You must be signed in to change notification settings - Fork 2
Replace simplecc with opencc-rs for Chinese conversion #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change replaces the outdated `simplecc` library with the more modern and actively maintained `opencc-rs` (version 0.3.0) for Traditional/Simplified Chinese text conversion. Reasons for the change: - `simplecc` was last updated in 2019 and used outdated OpenCC dictionaries. - `opencc-rs` is actively maintained and uses a much newer version of the OpenCC C++ library (v1.1.7 or v1.1.8 via opencc-sys), providing more accurate and up-to-date conversion dictionaries. Changes made: - Removed `simplecc` dependency from `src-tauri/Cargo.toml`. - Added `opencc-rs = "0.3.0"` dependency to `src-tauri/Cargo.toml`. (Note: v0.3.0 was used over v0.4.9 due to Rust edition compatibility with the current project setup. This version still provides OpenCC dictionaries from 2024). - Updated `src-tauri/src/main.rs` to use the `opencc-rs` API for the `opencc` Tauri command, including error handling for conversion failures. The backend now compiles successfully with these changes, and the Tauri application can be started in development mode for manual testing of the conversion functionality.
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
CI Feedback 🧐(Feedback updated until commit 1eeb1ac)A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
This change replaces the outdated
simplecclibrary with the more modern and actively maintainedopencc-rs(version 0.3.0) for Traditional/Simplified Chinese text conversion.Reasons for the change:
simpleccwas last updated in 2019 and used outdated OpenCC dictionaries.opencc-rsis actively maintained and uses a much newer version of the OpenCC C++ library (v1.1.7 or v1.1.8 via opencc-sys), providing more accurate and up-to-date conversion dictionaries.Changes made:
simpleccdependency fromsrc-tauri/Cargo.toml.opencc-rs = "0.3.0"dependency tosrc-tauri/Cargo.toml. (Note: v0.3.0 was used over v0.4.9 due to Rust edition compatibility with the current project setup. This version still provides OpenCC dictionaries from 2024).src-tauri/src/main.rsto use theopencc-rsAPI for theopenccTauri command, including error handling for conversion failures.The backend now compiles successfully with these changes, and the Tauri application can be started in development mode for manual testing of the conversion functionality.
PR Type
Enhancement
Description
Replaced
simpleccwithopencc-rsfor Chinese text conversionUpdated Rust backend code to use
opencc-rsAPI and error handlingRemoved
simpleccdependency and addedopencc-rsin Cargo.tomlUpdated project version in
package.jsonChanges walkthrough 📝
main.rs
Migrate backend Chinese conversion to opencc-rs with improved errorhandlingsrc-tauri/src/main.rs
simplecctoopencc-rsfor text conversionopencccommand to use new API and error handlingCargo.toml
Update dependencies: remove simplecc, add opencc-rssrc-tauri/Cargo.toml
simpleccdependency and related configurationopencc-rs = "0.3.0"as a new dependencypackage.json
Update project version in package.jsonpackage.json
2to0.1.0